From: Ray Strode Date: Mon, 22 Jul 2019 15:02:10 +0000 (-0400) Subject: appDisplay: Add AppFolderPopup destroy handler X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~145 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8e75d81a4417046a595b77218a87d8fbee3a96d1;p=gnome-shell.git appDisplay: Add AppFolderPopup destroy handler At the moment AppFolderPopup calls popdown on destruction, which leads to open-state-changed getting emitted after the actor associated with the popup is destroyed. This commit handles ungrabbing and closing from an actor destroy handler to side-step the open-state-changed signal. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index cd7a23e96..7c2eaf027 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1315,6 +1315,15 @@ var AppFolderPopup = class AppFolderPopup { }); this._grabHelper.addActor(Main.layoutManager.overviewGroup); this.actor.connect('key-press-event', this._onKeyPress.bind(this)); + this.actor.connect('destroy', this._onDestroy.bind(this)); + } + + _onDestroy() { + if (this._isOpen) { + this._isOpen = false; + this._grabHelper.ungrab({ actor: this.actor }); + this._grabHelper = null; + } } _onKeyPress(actor, event) {